favorite_language = {
        'jen': 'python',
        'sarah':  'c',
        'edward': 'ruby',
        'phil': 'python',
        }
for name, language in favorite_language.items():
    print(name + ':' + language)
firends = ['jen', 'phil']
for name in favorite_language.keys():
    print(name.title())
    if name in firends:
        print("Hi," + name.title() + "I see your favorite_language is " +
                favorite_language[name].title() + '!')

if 'erin' not in favorite_language.keys():
    print("Erin , please take our pool !")

for language in favorite_language.values():
    print(language)

print("Sarah's favorite_language is " + 
        favorite_language['sarah'].title() + '.')
for name in sorted(favorite_language.keys()):
    print(name.title() + ", Thank you for taking the poll!")
print("The following language have been mentioned!")
for language in set(favorite_language.values()):
    print(language.title())
print('===================================================')

people = {
        'first_name': 'wang',
        'last_name': 'xu',
        'age': 18,
        'city': '广州',
        }
print(people['first_name'])
print(people['last_name'])
print(people['age'])
print(people['city'])

like_number = {
        'xiaoming': 3,
        'xiaohong': 12,
        'xiaogang': 22,
        'xiaofang': 12,
        'xiaoqiang': 13,
        }

print(like_number['xiaofang'])
print(like_number['xiaogang'])
print(like_number['xiaohong'])
print(like_number['xiaoming'])
print(like_number['xiaoqiang'])


dictionary = {

        }
dictionary['list'] = '列表'
dictionary['print'] = '打印'
dictionary['append'] = '在列表最后添加元素'
dictionary['pop'] = '从列表最后面开始去掉元素'
dictionary['del'] = '删除列表中的元素'
dictionary['if'] = '如果'
dictionary['int'] = '整数'
dictionary['float'] = '复数'
dictionary['set'] = '集合'
print(dictionary)
for name, value in dictionary.items():
    print(name + ':' + value)

print(favorite_language)
users = ['jen', 'sam']
for user in users:
    if user in favorite_language.keys():
        print('Thank you for poll.')
    elif user not in dictionary.keys():
        print('请参与调查。')
    else:
        print('报错了。')
